<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"></c:set>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>显示员工</title>
<link rel="stylesheet" href="${ctx}/css/input.css" />
<link rel="stylesheet" href="${ctx}/css/admin/staff/staffShow.css" />
<script src="${ctx}/js/jquery-3.2.1.js" type="text/javascript"></script>
<script src="${ctx}/js/admin/staff/staffShow.js" type="text/javascript"></script>
<script type="text/javascript" src="${ctx}/js/calendar/laydate.js"></script>
<script src="${ctx}/js/layer/layer.js" type="text/javascript"></script>
<script src="${ctx}/js/common.js" type="text/javascript"></script>
<!-- layui -->
<link rel="stylesheet" href="${ctx }/js/layui/css/layui.css"  media="all">
<script src="${ctx }/js/layui/layui.js" charset="utf-8"></script>
</head>
<body>
	<div class="biaoti">
		<h4 align="center">员工列表</h4>
		<hr>
	</div>
	<div class="caozuo">
		<div class="body_left">
			<form action="${ctx}/staff/searchByshow" id="searchById" method="post" style="height: 40px;">
			<div id='container'>
				<div class='message' style="background:url('../image/body_bj.jpg');">
			  		<label style="margin-top:20px;border: 1px solid #7ab893;border-radius: 4px;margin: 5px;" >
						<input type='text'  name=staffId id="staffId">
				      	<span>员工编号</span>
				    </label>
			  		<label style="margin-top:20px;border: 1px solid #7ab893;border-radius: 4px;margin: 5px;">
						<input type='text' name="name" id="staffName">
				      	<span>员工姓名</span>
				    </label>
			  		<label style="margin-top:20px;border: 1px solid #7ab893;border-radius: 4px;margin: 5px;">
						<input type='text'  name="sex" id="staffSex">
				      	<span>员工性别</span>
				    </label>
 					<input type="submit" class="selectBySth" value="查找">
					<select class="zhuangtai">
					<option>根据状态浏览</option>
					<option value="0">在职</option>
					<option value="1">离职</option>
				</select>
			<a href="${ctx}/staff/staffadds" class="addStaff">
				<img  src="${ctx}/image/add2.png" title="添加员工" class="img">
			</a>
			<a href="${ctx}/staff/staffshows?pageNow=1&pageSize=10">
				<img class="img" src="${ctx}/image/suoyou.png" title="查看所有员工">
			</a>
				</div>
			</div>
			</form>
		</div>
	</div>
	<input type="hidden" id="total" value="${svList.total}" />
	<table class="page" width="95%" style="margin-top: 30px">
		<colgroup>
			<col width="15%">
			<col width="15%">
			<col width="25%">
			<col width="15%">
		</colgroup>
		<tr>
			<td>序号</td>
			<td>员工编号</td>
			<td>员工姓名</td>
			<td>员工职位</td>
			<td>操作</td>
		</tr>
		<c:forEach items="${svList.staffll}" var="s" varStatus="c">
			<tr>
				<td>${c.count }</td>
				<td>${s.staffId }</td>
				<td>${s.name }</td>
				<td>${s.zhiwei }<c:if test="${s.status!=0}">(离职)</c:if></td>
				<td>
					<a href="javascript:void(1)" class="showMore">详细信息</a>
					<div style="display: none;" class="moreMessage">
							<div class="exit"><img src="${ctx}/image/exit.png"></div>
							<div class="textMessage">
								<table class="detail">
									<tr>
										<td class="staffKey">编号</td>
										<td class="staffValue">${s.staffId }</td>
										<td class="staffImage" rowspan="5">
											<img src="../upload/${s.image}" title="个人图像">
										</td>
									</tr>
									<tr>
										<td>姓名</td>
										<td>${s.name }</td>
									</tr>
									<tr>
										<td>性别</td>
										<td>${s.sex }</td>
									</tr>
									<tr>
										<td>职位</td>
										<td>${s.zhiwei }<c:if test="${s.status!=0}">(离职)</c:if>
										</td>
									</tr>
									<tr>
										<td>出生</td>
										<td><fmt:formatDate value="${s.birthday }" /></td>
									</tr>
									<tr>
										<td>住址</td>
										<td colspan="2">${s.address }</td>
									</tr>
									<tr>
										<td>身份证号</td>
										<td colspan="2">${s.personId }</td>
										</tr>
									</table>
								
							</div>
					</div>
<%-- 					<button class="layui-btn layui-btn-xs layui-btn-normal" id="alterStaff" sid=${s.staffId }>修改信息</button>
 --%>				<a href="javascript:void(0)" class="deleteStaff" sid=${s.staffId } name=${s.name } >删除记录</a>
					<a href="javascript:void(0)" class="alterStaff" sid=${s.staffId } >修改信息</a>
					<a href="javascript:void(0)" class="statusChange" sid=${s.staffId } name=${s.name }>${s.status==0?"解雇":"复职" }</a>
					<a href="javascript:void(0)" class="imageUpload" sid=${s.staffId } >添加照片</a>
				</td>
			</tr>
		</c:forEach>
	</table>
	<jsp:include   page="pagination.jsp" flush="true"/>
	<div style="display: none;" class="goodboy">
		<div class="exit"><img src="${ctx}/image/exit.png"></div>
		<!-- 图片上传 -->
		<form id="form_img"  method="post" enctype="multipart/form-data">
			<input name="staffId" id="uploadStaffId" type="hidden">
			<input name="file" type="file" placeholder="请选择一张图片" id="uploadStaffImg"> 
			<input type="submit" id="form_img_submit"  value="上传">
		</form>
	</div>
</body>
</html>







